﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>WinGetActiveStats</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../css/commands.css" rel="stylesheet" type="text/css">
<link href="../css/print.css" rel="stylesheet" type="text/css" media="print">
</head>
<body>

<h1>WinGetActiveStats</h1>

<p>将 <a href="WinGetActiveTitle.htm">WinGetActiveTitle</a> 和 <a href="WinGetPos.htm">WinGetPos</a> 合并为一条命令。</p>

<p class="CommandSyntax">WinGetActiveStats, Title, Width, Height, X, Y </p>
<h3>参数 </h3>
<table border="1" width="100%" cellspacing="0" cellpadding="3" bordercolor="#C0C0C0">
  <tr> 
    <td width="15%">Title</td>
    <td width="85%">存储当前激活窗口的标题的变量。</td>
  </tr>
  <tr>
    <td>Width/Height</td>
    <td>存储当前激活窗口的宽或高的变量。</td>
  </tr>
  <tr>
    <td>X, Y </td>
    <td>存储当前激活窗口左上角的横坐标和纵坐标的变量。</td>
  </tr>
</table>

<h3>注意</h3>
<p>如果没有找到匹配的窗口，输出变量为空。</p>
<p>这个命令等同于顺序执行下面两个命令：<br>
  <a href="WinGetTitle.htm">WinGetTitle</a>, Title, A<br>
  <a href="WinGetPos.htm">WinGetPos</a>, X, Y, Width, Height, A</p>
<p>如果当前激活的窗口是一个隐藏窗口并且 <a href="DetectHiddenWindows.htm">DetectHiddenWindows</a> 是关闭的（默认），则所有的命令，除了 <a href="WinShow.htm">WinShow</a> ，都不能检测到该窗口。如果因为这个原因或者其它的原因不能检测到当前激活的窗口，则该命令所有的输出变量都为空。</p>
<h3>相关命令</h3>
<p><a href="WinGetPos.htm">WinGetPos</a>, <a href="WinGetActiveTitle.htm">WinGetActiveTitle</a>, <a href="WinGetTitle.htm">WinGetTitle</a>, <a href="WinGetClass.htm">WinGetClass</a>, <a href="WinGetText.htm">WinGetText</a>, <a href="ControlGetText.htm">ControlGetText</a></p>
<h3>示例</h3>
<pre class="NoIndent">WinGetActiveStats, Title, Width, Height, X, Y
MsgBox, The active window &quot;%Title%&quot; is %Width% wide`, %Height% tall`, and positioned at %X%`,%Y%.</pre>

</body>
</html>
